<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>
<script src="./lodash.js"></script>
<script>
    // const arr = [1,2,3,4];
    // const obj = {
    //     name:arr
    // }
    // function fn(arr){
    //     console.log(arr);
    // }
    // const res = new Proxy((obj,{
    //     set(val){
    //         obj.name = val;
    //         fn(obj.name)
    //     }
    // }))
    // res.name([4,5,6])


const obj = [1,2,3,4]
function fn(data){
    return (data);
}

    const res = new Proxy(obj,{
        get(){
            return obj
        },
        set(target,key,value){
            target = value;
            fn(target)
        }
    })

    
    
</script>
    